package com.example.shiXun.service.impl;

import com.example.shiXun.base.result.Results;
import com.example.shiXun.dao.RoleUserDao;
import com.example.shiXun.domain.SysRoleUser;
import com.example.shiXun.service.RoleUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.transform.Result;

/**
 * @author ：meet
 * @date ：Created in 2020/4/12 20:18
 */
@Service
public class RoleUserServiceImpl implements RoleUserService {

    @Autowired
    private RoleUserDao roleUserDao;

    @Override
    public Results getSysRoleUserByUserId(Integer userId) {
        SysRoleUser sysRoleUser= roleUserDao.getSysRoleUserByUserId(userId);
        if (sysRoleUser!=null){
            return Results.success(sysRoleUser);
        }else {
            return Results.success();
        }
    }
}
